import webSite from '@/config/webSite'

export default (dataSourceKey, targetTableName, srcColumnDicData) => {
  return {
    submitText: '修改',
    labelWidth: 140,
    index: true,
    page: true,
    align: "center",
    menuAlign: 'center',
    menuPosition: "right",
    editBtn: true,
    addBtn: true,
    cellBtn: false,
    column: [
      {
        label: '目标数据表列',
        span: 24,
        prop: 'targetColumn',
        type: "select",
        dicUrl: webSite.baseUrl + `/bpm/sdrServiceApi/listTableColumn?dataSourceKey=${dataSourceKey}&&targetTableName=${targetTableName}`,
        props: {
          label: "label",
          value: 'prop'
        },
        cell: true,
        filterable: true,
        rules: [{
          required: true,
          message: "请选择目标数据表关系列",
          trigger: "blur"
        }]
      },
      {
        label: '云表单数据表列',
        span: 24,
        prop: 'srcColumn',
        type: "select",
        dicData: srcColumnDicData,
        multiple: true,
        searchSpan: 12,
        filterable: true,
        searchLabelWidth: 240,
        drag: true,
        props: {
          label: "label",
          value: "value",
        },
        cell: true,
        rules: [{
          required: true,
          message: "请选择当前数据表关系列",
          trigger: "blur"
        }]
      },
      {
        label: '数据分隔符',
        span: 24,
        prop: 'split',
        type: "input",
        cell: true,
      },
    ]
  }
}

